home *** CD-ROM | disk | FTP | other *** search
/ The Scorpion King Cardz / The Scorpion King Cardz - Disc 2 - Cassandra.iso / pc / assets / main.dxr / 00023_parent_utilNav.ls < prev    next >
Encoding:
Text File  |  2002-03-21  |  967 b   |  42 lines

  1. property pMyImage, pWidth, pHeight, x1, y1, pMyRect, pMyState, pVel
  2. global utilButtons, gTotalMenuButtons
  3.  
  4. on new me
  5.   pWidth = member("utilNav").width
  6.   pHeight = member("utilNav").height
  7.   pMyImage = image(pWidth, pHeight, 24)
  8.   pMyImage = member("utilNav").image.duplicate()
  9.   x1 = 190
  10.   y1 = -105
  11.   pMyRect = rect(x1, y1, x1 + pWidth, y1 + pHeight)
  12.   pMyState = #off
  13.   pVel = 0
  14.   return me
  15. end
  16.  
  17. on moveNav me
  18.   case pMyState of
  19.     #on:
  20.       y1 = y1 + pVel
  21.       if pVel > 0 then
  22.         pVel = pVel - 1
  23.       else
  24.         y1 = 0
  25.         repeat with i = 1 to gTotalMenuButtons
  26.           if count(utilButtons) < gTotalMenuButtons then
  27.             createUtilButtons()
  28.           end if
  29.         end repeat
  30.       end if
  31.       pMyRect = rect(x1, y1, x1 + pWidth, y1 + pHeight)
  32.     #off:
  33.       y1 = y1 - pVel
  34.       if pVel > 0 then
  35.         pVel = pVel - 1
  36.       else
  37.         y1 = -105
  38.       end if
  39.       pMyRect = rect(x1, y1, x1 + pWidth, y1 + pHeight)
  40.   end case
  41. end
  42.